//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Diagnostics.Contracts;
using OpenLS.Spreadsheet.Parsing;

namespace OpenLS.Spreadsheet.Expressions
{
#if DEBUG
    [System.Diagnostics.Contracts.ContractClass(typeof (UnqualifiedCellsAccessExpressionContract))]
#endif
    abstract class UnqualifiedCellsAccessExpression: NotQualifiedExpression
    {
        public override sealed Expression QualifiedExpression(RangeFactory factory)
        {
            return RangeQualifiedExpression(factory);
        }

        public abstract CellEnumeratorExpression RangeQualifiedExpression(RangeFactory factory);
#if DEBUG
        [ContractClassFor(typeof(UnqualifiedCellsAccessExpression))]
        class UnqualifiedCellsAccessExpressionContract : UnqualifiedCellsAccessExpression
        {

            public override CellEnumeratorExpression RangeQualifiedExpression(RangeFactory factory)
            {
                Contract.Requires(factory != null);
                throw new NotSupportedException();
            }
        }
#endif
    }

}